﻿<%@ Page Language="C#" MasterPageFile="~/Sitio.master" 
AutoEventWireup="true"  CodeFile="listadoEspecialidades.aspx.cs" Inherits="listadoEspecialidades" Title="Listado de las especialidades" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">
    <asp:Panel ID="panelListadoEspecialidades" runat="server">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<asp:Label ID="lblEspecialidades" runat="server" 
            style="font-weight: 700; font-size: large" Text="Listado de Especialidades"></asp:Label>
        &nbsp;<asp:GridView ID="gridEspecialidades" runat="server" 
            AutoGenerateColumns="False" BackColor="White" BorderColor="White" 
            BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" 
            DataKeyNames="id_especialidad" DataSourceID="SqlDataSourceEspecialidades" 
            GridLines="None">
            <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
            <Columns>
                <asp:BoundField DataField="id_especialidad" HeaderText="Id Especialidad" InsertVisible="False"
                    ReadOnly="True" SortExpression="id_especialidad" />
                <asp:BoundField DataField="desc_especialidad" HeaderText="Descripci&#243;n" SortExpression="desc_especialidad" />
                <asp:CommandField ShowDeleteButton="True" />
                <asp:HyperLinkField DataNavigateUrlFields="id_especialidad" DataNavigateUrlFormatString="listadoEspecialidades.aspx?id={0}"
                    Text="Editar" />
            </Columns>
            <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
            <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSourceEspecialidades" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnStringLocal %>" 
            
            SelectCommand="SELECT DISTINCT * FROM [especialidades]">
        </asp:SqlDataSource>
        <br />
    </asp:Panel>
    <asp:Panel ID="panelDatosEspecialidades" runat="server" Width="682px">
        <table style="width:70%;">
            <tr>
                <td colspan="2" style="text-align: center">
                    <asp:Label ID="lblEspecialidad" runat="server" 
                        style="text-align: center; font-weight: 700; font-size: large" 
                        Text="Label"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    Descripción especialidad:</td>
                <td class="style1">
                    <asp:TextBox ID="txtDescEspecialidad" runat="server" Width="301px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style2">
                    &nbsp;</td>
                <td class="style1">
                    <asp:Button ID="btnGuardar" runat="server" onclick="btnGuardar_Click" 
                        Text="Guardar" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnCancelar" runat="server" onclick="btnCancelar_Click" 
                        Text="Cancelar" Height="26px" />
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content> 